%% Solving the Double Integral of a Surface
function [S] = ellipse( a, b, c )
% ellipse

x = -a:0.1:a;   

y = (b.^2-(b.^2/a.^2)*x.^2).^1/2;   

ymax = max(y);  
ymin = min(y);  

f = @(x,y)sqrt( 1+((2*c/a.^2)*x).^2+((2*c/b.^2)*y).^2 );    


res = integral2(f,-a,a,ymin,ymax);  

S = res;   
end